<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算圆的周长和面积</title>
</head>
<body>
    <input type="text" placeholder="半径" id="a">
    <input type="text" placeholder="周长" id="b">
    <input type="text" placeholder="面积" id="c">


    <script>
        var pai = Math.PI;
        var num = prompt("请输入半径");
        var nub = 2*pai*num;
        var nue = pai*num*num;
        document.querySelector("#a").value = num;
        document.querySelector("#b").value = nub;
        document.querySelector("#c").value = nue;
    </script>
</body>
</html>